<!DOCTYPE html>
<html th:replace="~{layout :: layout(~{::title}, ~{::section})}">
<head>
    <title>产品列表</title>
</head>
<body>
    <section>
        <div class="row row-cols-1 row-cols-md-3 g-4">
            <div class="col" th:each="product : ${products}">
                <div class="card h-100">
                    <img th:src="@{${product.imageUrl}}" class="card-img-top" alt="产品图片">
                    <div class="card-body">
                        <h5 class="card-title" th:text="${product.name}"></h5>
                        <p class="card-text" th:text="${product.description}"></p>
                    </div>
                    <div class="card-footer">
                        <a th:href="@{/products/{id}(id=${product.id})}" class="btn btn-primary">查看详情</a>
                    </div>
                </div>
            </div>
        </div>
    </section>
</body>
</html>